using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;

namespace One_Crappy_RPG
{
    public class Heal1 : Spell
    {
        public Heal1(string name, int MP, Creature caster) : 
            base(name, MP, caster)
        {
            Hostile = false;
        }

        public override void Cast(Creature target)
        {
            int HealAmount = (Caster.Stats.Intelligence * 2) + 
                target.rng.Next(-5, 5);
            HealAmount = Math.Max(HealAmount, 0);

            //Pass HealAmount as negative so it adds to HP instead of subtracts
            EffectDamage HPUp = new EffectDamage(EffectDamage.DamageType.None,
                -HealAmount,
                target);

            SpellEffects.Add(HPUp);

            base.Cast(target);
        }
    }
}
